$().ready(function() {
		$('textarea.tinymce').tinymce({
			// Location of TinyMCE script
			script_url : '/media/js/tiny_mce/tiny_mce.js',
			theme : "advanced",
			mode : "exact",
			plugins : "emotions",
	        elements : 'abshosturls',
			theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,styleselect,removeformat,cleanup,code,emotions",
			theme_advanced_buttons2 : "",
			theme_advanced_buttons3 : "",
			theme_advanced_toolbar_location : "bottom",
			theme_advanced_toolbar_align : "center",
	        theme_advanced_resizing : true,
		    relative_urls : false

		});
		
		var value = $('input[name="zugriff"]:checked').val();

		if(value == 2){
			$("dl.pwd").show();
		}
		
		$('input[name="zugriff"]').change(function () {
          $("input[name=zugriff]:checked").each(function () {
        	  value = $(this).val();
        	  if(value == 2){
      			$("dl.pwd").show();
      		  }else{
      			$("dl.pwd").hide();
      		  }
          });
        });
		
	});